using System.Collections;

namespace Anvil.Core
{
	/// <summary>
	/// Describe data access operations. 
	/// </summary>
    /// <remarks>
    /// Extracted from the iBATIS.NET SqlMapper class. 
    /// </remarks>    
	public interface IDataMapper
	{
		
        object QueryForObject(string statementName, object parameterObject);

        object QueryForObject(string statementName, object parameterObject, object resultObject);

        IDictionary QueryForDictionary(string statementName, object parameterObject, string keyProperty);
        
        IDictionary QueryForDictionary(string statementName, object parameterObject, string keyProperty, string valueProperty);

        IDictionary QueryForMap(string statementName, object parameterObject, string keyProperty);

        IDictionary QueryForMap(string statementName, object parameterObject, string keyProperty, string valueProperty);

        IList QueryForList(string statementName, object parameterObject);

        IList QueryForList(string statementName, object parameterObject, int skipResults, int maxResults);
        
		void QueryForList(string statementName, object parameterObject, IList resultObject);

        object Insert(string statementName, object parameterObject);

        int Update(string statementName, object parameterObject);

        int Delete(string statementName, object parameterObject);	
				
	}
}
